---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: storage-main
  labels:
    storage: basemain
spec:
  accessModes:
  - ReadWriteMany
  capacity:
    storage: 8Gi
  local:
    path: /var/pgsql-volume
  nodeAffinity:
    required:
      nodeSelectorTerms:
      - matchExpressions:
        - key: db
          operator: In
          values:
          - pgsql-main
  persistentVolumeReclaimPolicy: Retain
---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: storage-repl
  labels:
    storage: baserepl
spec:
  accessModes:
  - ReadWriteMany
  capacity:
    storage: 8Gi
  local:
    path: /var/pgsql-volume
  nodeAffinity:
    required:
      nodeSelectorTerms:
      - matchExpressions:
        - key: db
          operator: In
          values:
          - pgsql-repl
  persistentVolumeReclaimPolicy: Retain
